// arcoVue
import AracVue from '@arco-design/web-vue'
import '@arco-design/web-vue/dist/arco.css';
// app
import App from './App.vue'
import '@arco-design/web-vue/dist/arco.css'
import ArcoVueIcon from '@arco-design/web-vue/es/icon';

// global css
import '@/assets/styles/index.scss'

// vue
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import router from './router'

import 'virtual:svg-icons-register'
import SvgIcon from '@/components/SvgIcon/index.vue'

// permission control
import './permission'
// plugins
import plugins from './plugins'
// dict
import { useDict } from '@/utils/dict'
//help
import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/help'


// 字典标签组件
import DictTag from '@/components/DictTag'

const app = createApp(App)
app.config.globalProperties.useDict = useDict
app.config.globalProperties.parseTime = parseTime
app.config.globalProperties.resetForm = resetForm
app.config.globalProperties.addDateRange = addDateRange
app.config.globalProperties.handleTree = handleTree
app.config.globalProperties.selectDictLabel = selectDictLabel
app.config.globalProperties.selectDictLabels = selectDictLabels

app.use(createPinia())
app.use(router)
// app.use(plugins)
app.use(AracVue)
app.use(ArcoVueIcon)
app.component('svg-icon', SvgIcon)
app.component('DictTag', DictTag)

app.mount('#app')
